package Maximum;

//Simple class behaving as a Condition Variable
public class CondVar {
  private boolean flag = false;
  private float[] data ;

  public synchronized float[] waitOn() throws InterruptedException {
    while(!flag) {
	wait();
    }
    return data;
  }

 public synchronized void signal(float[] d) {
    flag = true;
    data=d;
    notifyAll();
  }

} // End of CondVar class
